package com.nowcoder.Offer.String;

import org.junit.Test;

/**
 * 左旋转字符串
 */
public class RotateString {
    public String LeftRotateString(String str,int n) {
        String s1 = str.substring(0,n);
        String s2 = str.substring(n);
        return s2 + s1;
    }

    @Test
    public void test(){
        System.out.println(LeftRotateString("abcXYZdef",3));
    }
}
